package logicclient;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import records.SalesRecord;
import ClientLogic.IReturn;
import ClientLogic.Return;


public class ReturnTest {
	IReturn testReturn = new Return("AB2011001");
	@Test
	public void testAddItem(){
		boolean isAdd = testReturn.addItem("1", 2);
		assertEquals(true, isAdd);
	}
	
	@Test
	public void testStartReturn(){
		testReturn.addItem("2", 2);
		boolean isReturn = testReturn.startReturning();
		assertEquals(true, isReturn);
	}
	
	@Test
	public void testGetSalesRecord(){
		SalesRecord sr = testReturn.getSalesRecoed(1);
		assertEquals("AB2011001", sr.getSalerID());
		System.out.println(sr.getTotalValue());
	}
}
